#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QPushButton>
#include <QWidget>
#include <QGraphicsScene>
#include <QGraphicsProxyWidget>
#include <QGraphicsView>
#include <QMouseEvent>


#define MAX_SPEED (50)
#define INTERVAL (50)

QT_BEGIN_NAMESPACE
namespace Ui {
class MainWindow;
}
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();
    void addTurnTable(QString pixmapPath);
    void addPointer(QString pixmapPath);
    void addCloseButton();

protected slots:
    void rotation();

protected:
    void mousePressEvent(QMouseEvent *event) override;
    void mouseMoveEvent(QMouseEvent *event) override;
    void mouseReleaseEvent(QMouseEvent *event) override;
    void resizeEvent(QResizeEvent *event) override;

private:
    Ui::MainWindow *ui;
    QPushButton* m_Pointer = nullptr;
    QWidget* m_TurnTable = nullptr;
    QGraphicsProxyWidget *m_Proxy = nullptr;
    QGraphicsView *m_View = nullptr;
    QGraphicsScene* m_Scene = nullptr;
    bool m_Flag = false;
    bool isDragging;
    QPoint dragStartPosition;
    QPushButton* m_CloseButton = nullptr;
};
#endif // MAINWINDOW_H
